/*
*ReservedWords.fx
*
*Created on Apr 3, 2011, 23:45:09 PM
*/

package mythesis.controller;
import java.lang.String;

public class ReservedWords {
};

public function isReserved(varname:String):Boolean
{
    var t = varname.toUpperCase();
    for (i in [0..reservedWords.size()-1])
    {
        var s = reservedWords[i].toUpperCase();
        if (s == t)
        {
            return true;
        }
    }

    return false;
}

var reservedWords:String[] =
[
	// java keywords
	"String",
	"int",
	"var",
	"for",
	"while",
	"break",
	"double",
	"return",
	"this",
	"private",
	"void",
	"public",
	"try",
	"catch",
	"if",
	"else",
	"null",
	"continue",

	// bonus variables 
	"allowedMoves",
	"suggester",
	"suggested",
	"disproved",
	"disprover",
	
	// data types
	"Number",
	"Word",
	"Truth",
	
	// single letters, in case they're used for for-loops
   	"a", "b", "c", "d", "e", "f", "g", "h",
   	"i", "j", "k", "l", "m", "n", "o", "p",
   	"q", "r", "s", "t", "u", "v", "w", "x",
   	"y", "z",
   	
   	// variables inside the AI file itself
   	"sleepPeriod",
   	"myName",
   	"dead",
   	"inbox",
   	"motive",
   	"destination",
   	"disproofReceived",
   	"incomingDisproof",
   	"motives",
	"findRoom",
	"walkToRoom",
	"output",
	"debugLevel",
	"message",
	"me",
	"gameController",
	"textParser",
	"textHandler",
	"gameConfig",
	"lines",
	"buffer",
	"myCards",
	"myDCards",
	"result",
	"unEliminatedCards",
	"found",
	"node",
	"walkInfo",
	"output",
	"start",
	"stop",
	"stopOver",
	"rooms",
	"disproofInfo",
	"cardShown",
	
	// new built-in variables
	"disprover",
	"suggester",
	"disproofCard",
	"disproofPerson",
	"suggestedSuspect",
	"suggestedWeapon",
	"suggestedRoom",
	"allowedMoves",
	"card1",
	"card2",
	"card3",
	"card4",
	"card5",
	"card6",
	

	//detective pad	
	"dpHall",
	"dpConservatory",
	"dpStudy",
	"dpBilliardRoom",
	"dpLibrary",
	"dpBallroom",
	"dpLounge",
	"dpKitchen",
	"dpDiningRoom",
	"dpMrsWhite",
	"dpMissScarlett",
	"dpReverendGreen",
	"dpColonelMustard",
	"dpMrsPeach",
	"dpProfessorPlum",
	"dpRope",
	"dpDagger",
	"dpSpanner",
	"dpRevolver",
	"dpLeadPipe",
	"dpCandlestick",
	
	//cards
	"Hall",
	"Conservatory",
	"Study",
	"BilliardRoom",
	"Library",
	"Ballroom",
	"Lounge",
	"Kitchen",
	"DiningRoom",
	"MrsWhite",
	"MissScarlett",
	"ReverendGreen",
	"ColonelMustard",
	"MrsPeach",
	"ProfessorPlum",
	"Rope",
	"Dagger",
	"Spanner",
	"Revolver",
	"LeadPipe",
	"Candlestick",

];

/*
possible additions:
weapon
suspect
room
numberOfWeapons
numberOfSuspects
numberOfRooms
possSuspects
possWeapons
params
param
cardShown
target
path
altPath
playerWithCard
currentPlayer
livePlayers
players
playerPosition
testCard
defendant
*/